<template>
<div class="page singleTestDetail-page" id="singleTestDetail-page_{{getNewId}}" data-page="singleTestDetail" style="z-index: 2">
        <div class="link-page-nav">
            <a href="#" class="link" @click=$root.backToTab()>
                <i class="iconfont icon-zuo"></i>
            </a>
        </div>
        <div class="add-keyAlarm" @click="startTestBtn()" id="startSingleTest_{{getNewId}}" style="display:none">
            <a href="" class="link icon-only" data-view=".view-main">
                <span style="font-size: 12px;width:24px;color:#fff;margin-top:7px;" id="testButton_{{getNewId}}">开始测试</span>
            </a>
        </div>
        <div class="link-page-top">
            <div class="link-page-title">任务详情</div>
            <a href="#" @click="buildDetail()" class="btn-buildDetail">
                <i class="iconfont icon-APPicon_loudongshitu" style="font-size: 24px"></i>
            </a>
        </div>
        <div class="page-content ptr-content" style="padding-bottom: 150px" @ptr:refresh="refreshCurrent">
            <div class="ptr-preloader" style="top: -40px;">
                <div class="preloader color-multi"></div>
                <div class="ptr-arrow"></div>
            </div>
            <div class="mChart" id="mChart_{{getNewId}}"></div>
            <div class="mChartInfo" id="mChartInfo_{{getNewId}}">
                <label>完成进度</label>
                <div><span class="pre-num" id="preNum_{{getNewId}}">0<span><span class="pre-fh">%</span></div>
                <div class="bfb"><span style="color:#777" id="finNum_{{getNewId}}">0</span>/<span id="total_{{getNewId}}">0</span></div>
            </div>
            <div class="content-panels" style="margin-top:0">
                <div class="sta_time">
                    <span id="status_{{getNewId}}"></span>
                    <span class="marginl" id="residueTime_{{getNewId}}"></span>
                </div>
                <p class="tt" style="margin-bottom:0;font-weight: bold" id="taskName_{{getNewId}}"></p>
                <div class="unit-name"><i class="iconfont icon-APPicon_dingwei" style="color:#2471CA;font-size: 14px;"></i><label id="unitName_{{getNewId}}"></label></div>
                <div class="turn-time">
                    <span class="iteml">时间周期</span>
                    <span class="itemr" id="planTime_{{getNewId}}" style="width: 80%;"></span>
                </div>
            </div>
            <div class="bottom-line"></div>

            <div class="content-panels" id="residualTask_{{getNewId}}">
                <p class="tt">剩余作业</p>
                <div class="pdb10">
                    <a href="#" @click="maintainEqu(1)" style="display: block;">
                        <span class="iteml">待测试资产数量</span>
                        <span class="itemr" style="color:#397ECE;" id="waitWork_{{getNewId}}">0</span>
                    </a>
                </div>
                <p class="iteml">待作业区域</p>
                <div id="waitAreaItem_{{getNewId}}" class="pdb10">
                </div>
            </div>

            <div class="content-panels" id="finshTask_{{getNewId}}">
                <p class="tt">已完成作业</p>
                <div class="pdb10">
                    <a href="#" @click="maintainEqu(2)" style="display: block;">
                        <span class="iteml">已完成测试资产数量</span>
                        <span class="itemr" style="color:#397ECE" id="assetsFinshNum_{{getNewId}}">0</span>
                    </a>
                </div>
                <div class="pdb10">
                    <a href="#" @click="picDetail(1)" style="display:block">
                        <span class="iteml">已上传作业前照片</span>
                        <span class="itemr"><i class="icon iconfont icon-jiantou beforePicLen"></i> <span class="beforePicNull" style="display: none;color:#397ECE;">0</span></span>
                    </a>
                </div>
                <div class="pic-panels" id="beforPic_{{getNewId}}"></div>
                <div class="pdb10">
                    <a href="#" @click="picDetail(2)" style="display:block">
                        <span class="iteml">已上传作业后照片</span>
                        <span class="itemr"><i class="icon iconfont icon-jiantou afterPicLen"></i><span class="afterPicNull" style="display: none;color:#397ECE;">0</span></span>
                    </a>
                </div>
                <div class="pic-panels" id="afterPic_{{getNewId}}"></div>
            </div>
            <div class="content-panels RelationPolice1 RelationPolice2" id="relativePolice_{{getNewId}}" style="margin-top: 35px;display: none;">
                <span class="tt">关联警情</span>
                <p class="hint">系统自动关联可能由当前联动测试引起的设备报警信息。如果和实际不一致，请修改。</p>
                <ul id="alarmList_{{getNewId}}">
                </ul>
                <div class="deviceHint">
                    <span id="deviceHintInfo_{{getNewId}}"></span>
                </div>
                <div>
                    共发生警情
                    <span style="margin-left:8px" id="alarmTotal_{{getNewId}}"></span>
                    <a href="#" @click="correlatedAlarm()"><label>明细</label></a>
                </div>
                <div class="hr"></div>
            </div>

            <div class="content-panels" style="margin-top:60px">
                <div>
                    <span class="tt">任务责任人</span>
                    <a href="#" id="addMan_{{getNewId}}" @click="addMan()">
                        <span class="itemr" style="color: #397ECE"><i class="iconfont icon-APPicon_tianjia" style="color: #397ECE;margin-right:4px"></i>添加责任人</span>
                    </a>
                </div>
                <div id="singleTestListItem_{{getNewId}}" style="display: inline-block; width: 100%;"></div>
            </div>

            <div class="content-panels">
                <p class="tt" style="margin-bottom:20px">作业内容</p>
                <p class="work-content" id="workContent_{{getNewId}}"></p>
            </div>
            <div class="bottom-line"></div>

            <div class="content-panels">
                <p class="tt" style="margin-bottom:20px">作业标准</p>
                <p class="work-content" id="workStandard_{{getNewId}}"></p>
            </div>
            <div class="bottom-line"></div>

            <div id="timeLine_{{getNewId}}">
                <div class="content-panels">
                    <p class="tt" style="margin-bottom:15px">任务完成时间线</p>
                    <a href="#" @click="timeLine()" style="display:block">
                        <span class="iteml">立即查看</span>
                        <span class="itemr"><i class="icon iconfont icon-jiantou"></i></span>
                    </a>
                </div>
                <div class="bottom-line"></div>
            </div>

            <div id="repairList_{{getNewId}}">
                <div class="content-panels">
                    <p class="tt" style="margin-bottom:15px">关联的故障维修单</p>
                    <a href="#" style="display:block" @click="goRepairList()">
                        <span class="iteml">立即查看</span>
                        <span class="itemr"><i class="icon iconfont icon-jiantou"></i></span>
                    </a>
                </div>
                <div class="bottom-line"></div>
            </div>

            <div class="content-panels">
                <p class="tt" style="margin-bottom:15px">关联的作业申请单</p>
                <a href="#" style="display:block" @click="workApply">
                    <span class="iteml">立即查看</span>
                    <span class="itemr"><i class="icon iconfont icon-jiantou"></i></span>
                </a>
            </div>
        </div>
    </div>
</template>
<style scoped>
.demo-swiper{
    margin: 0px;
    height: 75px;
}
.demo-swiper .swiper-slide img {
    height: 75px;
    display: block;
}
</style>
<script>
  return {
    mounted() {
        var self = this;
        var app = self.$app;
        self.taskId = this.$route.params.taskId;
        self.jumpFromPage = this.$route.params.pageName;
    },
    data: function() {
        return {
            getNewId: (new Date()).getTime(),
            pageName: "singleTestDetail",
            orgIds: 0,
            jumpFromPage: "",
            orgName: "",
            taskId: '',
            taskName: "",
            status: 0, //页面显示状态
            saveResponsPeople: [], // 保存责任人
            taskHandelStatus:0,
            doTastPeople:'',
            doTastTestTaskId:'',
            relateTaskList:{},
            workAcoountsStatus:0,//状态：0：表示未开始，1：表示开始，是当前用户已加入2：表示已开始，当前用户未加入
        }
    },
    methods: {
        startTestBtn:function(){
            var self = this;
            if(self.taskStatus == 1){
                //作业申请
	            var jsonTask = JSON.stringify(self.relateTaskList);
        		app.router.navigate("/workApplyCreate/"+self.taskId+"/"+jsonTask+"/");
            }else{
                //继续测试
                if(self.taskHandelStatus == 1){
                    //跳转联动测试作业页面
                    app.router.navigate("/allBuild/singleTestDetail/"+self.taskId+"/"+self.orgName+"/"+encodeURIComponent(self.taskName)+"/"+self.taskStatus+"/"+self.orgIds+"/");
                }
                //加入测试
                else if(self.taskHandelStatus == 2){
                    joinTest(self.doTastPeople,self.doTastTestTaskId,function(){
                        //跳转到楼栋视图
                        app.router.navigate("/allBuild/singleTestDetail/"+self.taskId+"/"+self.orgName+"/"+encodeURIComponent(self.taskName)+"/"+self.taskStatus+"/"+self.orgIds+"/");
                    });
                }else{
                    startTest(self.taskId,function(){
                        // 跳转到楼栋视图
                        app.router.navigate("/allBuild/singleTestDetail/"+self.taskId+"/"+self.orgName+"/"+encodeURIComponent(self.taskName)+"/"+self.taskStatus+"/"+self.orgIds+"/");
                    });
                }
            }
        },
        picDetail: function(type) { //跳转照片墙
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/maintainDetailPic/"+self.taskId+"/"+type + "/")
            }
        },
        //保养设备 资产
        maintainEqu: function(status) {
            let self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/maintainEquipt/" + self.taskId + "/"+status+"/");
            }
        },
        timeLine: function() { //跳转时间线
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/maintainDetailTimeLine/" + self.taskId + "/3/");
            }
        },
        addMan: function() { //跳转添加责任人
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                if (self.saveResponsPeople.length == 0) {
                    self.saveResponsPeople.push(0);
                }
                app.router.navigate("/maintainOwner/" + self.orgIds + "/" + self.taskId + "/singleTestDetail/" + self.saveResponsPeople.toString());
            }
        },
        buildDetail: function() { //跳转楼栋视图
            var self = this;
            app.router.navigate("/allBuild/singleTestDetail/" + self.taskId + "/" + self.orgName + "/" + encodeURIComponent(self.taskName) + "/" + self.status + "/" + self.orgIds + "/");
        },
        correlatedAlarm: function() { //跳转到关联的警情  type 0  查看  1编辑
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/correlatedAlarm/" + self.taskId + "/0/0/0/0/singleTestDetail");
            }
        },
        workApply: function() { //跳转关联作业申请
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/workApplyList/" + self.taskId + "/");
            }
        },
        goRepairList: function(type) { //跳转关联故障单
            var self = this;
            if(native.getDataByKey("IS_OFFLINE_MODULE") == 1){
                app.methods.showToastCenter("离线模式下不能跳转");
                return
            }else{
                app.router.navigate("/repairList/" + self.taskId + "/");
            }
        },
        getRelateAlarmCountByTaskId: function() {
            var self = this;
            $("#deviceHintInfo_" + self.getNewId).parent().hide();
            $("#alarmList_" + self.getNewId).hide();
            Dao.getRelateAlarmCountByTaskId({
                userName: userInfor.accountName,
                deviceId: appKeyObj.deviceId,
                taskId: self.taskId,
            }, function(data, total) {
            	common.loading(0);
                var alarmTotal = 0;
                if (total > 0) {
                    if (data != null && data.length != 0) {
                    	jQuery("#alarmList_" + self.getNewId).empty().show();
                        for (var i = 0; i < data.length; i++) {
                            var icons = JSON.parse(data[i].iconUrl).icon;
                            if (data[i].fireTTypes == "10") {
                                $("#alarmList_" + self.getNewId).append(`<li>
                                <div class="img"><img src="` + icons + `"></div>
                                <span">` + data[i].fcFacilitiesCategoryName + `</span>
                                <span class="times"><label style="color:#E07762">报警 </label>×<label>` + data[i].times + `</label>次</span>
                                </li>`);
                            } else {
                                $("#alarmList_" + self.getNewId).append(`<li>
                                <div class="img"><img src="` + icons + `"></div>
                                <span">` + data[i].fcFacilitiesCategoryName + `</span>
                                <span class="times"><label style="color:#FFC73B">故障 </label>×<label>` + data[i].times + `</label>次</span>
                                </li>`);
                            }
                            alarmTotal = alarmTotal + data[i].times;
                        }

                    }
                } else {
                    $("#deviceHintInfo_" + self.getNewId).parent().show();
                    $("#deviceHintInfo_" + self.getNewId).empty().html(common.transNullundefinedToline(data.info));
                }
                $("#alarmTotal_" + self.getNewId).empty().html(alarmTotal + "次");
            });
        },
        getTestTaskStatus:function(){//获取当前用户任务状态
      	  var self = this;
      	  common.loading(1);
      	  Dao.getTestTaskStatus({
                userName: userInfor.accountName,
                account: userInfor.accountName,
                taskId: self.taskId, //任务id
                type:3,//type维保类型 1 维保巡查任务 2保养任务 3测试任务 4联动测试任务
            }, function(data) {
          	  self.workAcoountsStatus=data.status;
          	  self.getInfoData();
            });
        },
        getInfoData: function() { //获取任务信息
            var self = this;
            //$("#residualTask_" + self.getNewId).hide();
            $("#finshTask_" + self.getNewId).hide();
            $("#timeLine_" + self.getNewId).hide();
            $("#repairList_" + self.getNewId).hide();
            $("#addMan_" + self.getNewId).hide();
            
            Dao.getMaintainTaskInfoDto({
                userName: userInfor.accountName,
                deviceId: appKeyObj.deviceId,
                taskId: self.taskId, //任务id
                //taskId:1,//任务id
            }, function(data) {
                common.loading(0);
                if (data) {
                	self.buildRelateTask(data);
                    self.orgIds = data.orgId;
                    self.orgName = data.orgName;
                    self.taskName = data.name;
                    self.status = data.status;

                    self.taskStatus = data.status;
                    if (self.taskStatus == 1) {
                        $("#residualTask_" + self.getNewId).show();
                        if(userInfor.role[0].id==183 || userInfor.role[0].id==184)
                        $("#addMan_" + self.getNewId).show();
                    } else if (self.taskStatus == 2) {
                        $("#residualTask_" + self.getNewId).show();
                        $("#finshTask_" + self.getNewId).show();
                        $("#timeLine_" + self.getNewId).show();
                        $("#repairList_" + self.getNewId).show();
                        if(userInfor.role[0].id==183 || userInfor.role[0].id==184)
                        $("#addMan_" + self.getNewId).show();
                    } else {
                        $("#finshTask_" + self.getNewId).show();
                        $("#timeLine_" + self.getNewId).show();
                        $("#repairList_" + self.getNewId).show();
                    }

                    var finCount = 0;
                    if (data.finishCount) {
                        finCount = data.finishCount;
                    }
                    //var percent = (finCount / data.assetsCount * 100).toFixed(2);
                    let percent = finCount / data.assetsCount * 100;
                    if (percent == 0 || percent == 100) {
                        percent = percent;
                    } else {
                        percent = percent.toFixed(2);
                    }
                    self.initChart(percent);
                    $("#preNum_" + self.getNewId).empty().html(common.transNullundefinedToline(percent + "%"));
                    $("#finNum_" + self.getNewId).empty().html(common.transNullundefinedToline(finCount + ""));
                    $("#total_" + self.getNewId).empty().html(common.transNullundefinedToline(data.assetsCount));
                    var staStr;
                    if (data.status == 1) {
                        staStr = "未开始";
                    } else if (data.status == 2) {
                        staStr = "进行中";
                    } else {
                   	     if(parseInt(percent) == 100) {
                   		     staStr = "已结束&nbsp;&nbsp;<span>已完成</span>";
                   	     } else {
                   	    	 staStr = "已结束&nbsp;&nbsp;<span style='color:#E07762'>未完成</span>";  
                   	     }
                    }
                    $("#status_" + self.getNewId).empty().html(common.transNullundefinedToline(staStr));
                    if (data.status != 3) {
                        $("#residueTime_" + self.getNewId).empty().html(toEndTime(data.endTime)); //剩余365天
                    } else {
                        $("#residueTime_" + self.getNewId).hide();
                    }
                    $("#taskName_" + self.getNewId).empty().html(common.transNullundefinedToline(self.taskName));
                    $("#unitName_" + self.getNewId).empty().html(common.transNullundefinedToline(self.orgName));
                    $("#planTime_" + self.getNewId).empty().html(common.transNullundefinedToline(moment(data.startTime.substring(0, 10)).format('YYYY/MM/DD') + " ~ " + moment(data.endTime.substring(0, 10)).format('YYYY/MM/DD')));
                    $("#waitWork_" + self.getNewId).empty().html(common.transNullundefinedToline((data.assetsCount - finCount) + ""));
                    //$("#waitAreaItem_" + self.getNewId).empty().html(common.transNullundefinedToline(data.residueWorkPlaceList));
                    $("#waitAreaItem_" + self.getNewId).html( data.residueWorkPlaceList==null?'无':(data.residueWorkPlaceList) );
                    $("#assetsFinshNum_" + self.getNewId).empty().html(common.transNullundefinedToline(finCount + ""));
                    let beforePicList = data.beforeWorkPicList;
                    let afterPicList = data.afterWorkPicList;
                    if(JSON.stringify(beforePicList)==='{}'){
                            $("#beforPic_" + self.getNewId).hide()
                            jQuery('.beforePicNull').show()
                            jQuery('.beforePicLen').hide()
                        }else{
                            $("#beforPic_" + self.getNewId).show()
                            jQuery('.beforePicLen').show()
                        }
                        if(JSON.stringify(afterPicList)==='{}'){
                            jQuery('.afterPicNull').show()
                            jQuery('.afterPicLen').hide()
                            $("#afterPic_" + self.getNewId).hide()
                        }else{
                            jQuery('.afterPicLen').show()
                            $("#afterPic_" + self.getNewId).show()
                        }
                    $("#beforPic_" + self.getNewId).empty();
                    let picArr = [];
                    for (let key in beforePicList) {
                        let picUrls = beforePicList[key];
                        let picAarr = picUrls.split(',');
                        picArr = picArr.concat(picAarr);
                    }
                    //展示图片
                    showImage(jQuery("#beforPic_" + self.getNewId),picArr.toString(),3);
                    
                    $("#afterPic_" + self.getNewId).empty();
                    let picArr1 = [];
                    for (let key in afterPicList) {
                        let picUrls = afterPicList[key];
                        let picAarr = picUrls.split(',');
                        picArr1 = picArr1.concat(picAarr);
                    }
                    //展示图片
                    showImage(jQuery("#afterPic_" + self.getNewId),picArr1.toString(),3);

                    var userList = data.dutyUserList;
                    var userHtml = "";
                    var maintainAccount="";//用于判断当前登录人是否责任人
                    self.saveResponsPeople = [];
                    $("#singleTestListItem_" + self.getNewId).empty();
                    if (userList) {
                        for (var i = 0; i < userList.length; i++) {
                            self.saveResponsPeople.push(userList[i].accountName);
                            maintainAccount+=userList[i].accountName;
                            var phoneNum = userList[i].phone;
                            if (i % 2 == 0) {
                                userHtml += `<div class="area-panels">
                                                <a href="tel:` + phoneNum + `" onclick="window.location='tel:`+phoneNum+`'">
                                                    <p>` + userList[i].name + ` <i class="iconfont icon-phone-channel phone"></i></p>
                                                    <p class="area" style="color:#999">` + (userList[i].postName ? userList[i].postName : "-") + `</p>
                                                </a>
                                            </div>`
                            } else {
                                userHtml += `<div class="area-panels" style="margin-right:0">
                                                <a href="tel:` + phoneNum + `" onclick="window.location='tel:`+phoneNum+`'">
                                                    <p>` + userList[i].name + ` <i class="iconfont icon-phone-channel phone"></i></p>
                                                    <p class="area" style="color:#999">` + (userList[i].postName ? userList[i].postName : "-") + `</p>
                                                </a>
                                            </div>`
                            }
                        }
                        $("#singleTestListItem_" + self.getNewId).append(userHtml);
                    } else {
                        //$("#singleTestListItem_" + self.getNewId).hide();
                    }
                    if(self.taskStatus<3 && maintainAccount.indexOf(userInfor.accountName)>=0){//当前登录人是责任人
                    	$("#addMan_" + self.getNewId).show();
						if(self.workAcoountsStatus==1)
                    		jQuery("#startSingleTest_" + self.getNewId).show();
					}else{
						jQuery("#startSingleTest_" + self.getNewId).hide();
					}
                    
                    var contentList = data.maintainStandardContentList;
                    var workContentStr = "";
                    for (var i = 0; i < contentList.length; i++) {
                        if ((i + 1) != contentList.length) {
                            workContentStr += contentList[i].workContent + "；"
                        } else {
                            workContentStr += contentList[i].workContent + "。"
                        }
                    }
                    $("#workContent_" + self.getNewId).empty().html(common.transNullundefinedToline(workContentStr));
                    $("#workStandard_" + self.getNewId).empty().html(common.transNullundefinedToline(data.workStandard));
                    //加载关联的警情
                    self.getRelateAlarmCountByTaskId();

                    //开始测试按钮状态
                    //未开始详情
                    if(self.taskStatus == 1){
                        $("#testButton_" + self.getNewId).html("作业申请");
                    }else{
                        self.taskHandelStatus = data.taskStatus;
                        if(self.taskHandelStatus){
                            if(self.taskHandelStatus == 1){
                                $("#testButton_" + self.getNewId).html("继续测试");
                            }else if(self.taskHandelStatus == 2){
                                $("#testButton_" + self.getNewId).html("加入测试");
                            }else{
                                $("#testButton_" + self.getNewId).html("开始测试");
                            }
                        }
                    }
                    //正在测试人员
                    self.doTastPeople = data.testTaskWorkAcoounts;
                    self.doTastTestTaskId = data.testTaskId;
                }
            });
        },
        initChart: function(value) {
            let self = this
            var myChart = echarts.init(document.getElementById("mChart_" + self.getNewId));
            option = {
                color: ['#2471CA', '#F1F1F1'],
                series: [{
                    name: '',
                    type: 'pie',
                    radius: ['50%', '60%'],
                    center: ['50%', '45%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            show: true,
                            textStyle: {
                                fontSize: '30',
                                fontWeight: 'bold'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data: [{
                            value: value,
                            name: ''
                        },
                        {
                            value: 100 - value,
                            name: ''
                        },
                    ]
                }]
            };
            myChart.setOption(option, true);
        },
        refreshCurrent: function(e, done) {
            var self = this;
            var $ = self.$$;
            if (done && e) {
                setTimeout(function() {
                    self.getInfoData();
                    done();
                }, 1000);
            }
        },
        buildRelateTask:function(data){
        	var self = this;
        	var obj = {};
            obj.id= data.id;
            obj.name= data.name;
            obj.status = data.status;
            obj.maintainType = data.maintainType;
            obj.startTime= data.startTime;
            obj.endTime= data.endTime;
            self.relateTaskList[data.id]=obj;
        },
    },
    on: {
        pageInit: function(e, page) {
            var self = this;
            if (self.jumpFromPage == "allBUild") {
                jQuery('#singleTestDetail-page_' + self.getNewId + ' .btn-buildDetail').hide()
            }
            self.getTestTaskStatus();
        },
        pageAfterIn: function(e, page) {
            var self = this;
            //未开始里面不展示警情
            if(self.taskStatus != 1){
                $("#relativePolice_" + self.getNewId).show();
            }
        }
    }
  }
</script>